<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<!DOCTYPE html>
<html lang="en">
<head>
<title><s:message code="app.title" /></title>
<%@ include file="Include.jsp"%>
<script type="text/javascript">
	
	$(document).ready(function() {
		$("#jobnoid").focus();	
	});
	
</script>
</head>
<body>
	<div class="container">
		<%@ include file="Menu.jsp"%>
		<h2><s:message code="pkgCartingForm.addheader" /></h2>
		<hr>
		<form:form id="cancelForm">
		</form:form>
		<form:form class="form-horizontal" method="post" name="pkgCartingForm" id="pkgCartingForm" commandName="PkgCartingForm"
	           modelAttribute="pkgcartingForm" >
			<s:bind path="*">
				<c:if test="${status.error}">
					<div id="message" class="text-error"><b>Please check your inputs.</b></div>
				</c:if>
			</s:bind>
			<table class="table table-bordered">
				<tr>
					<th width="10%"><form:label path="jobnoid"><s:message code="jobRegisterForm.jobno" /></form:label></th>
					<td>
						<form:select path="jobnoid" cssClass="input-large" tabindex="1">
							<form:option value="">- Select -</form:option> 
							<form:options items="${jobnoList}" itemLabel="jobno" itemValue="jobnoid" />
						</form:select>
						<form:errors cssClass="text-error" path="jobnoid" />
					</td>
				</tr>
				<tr>
					<th><form:label path="truckno"><s:message code="pkgCartingForm.truckno" /></form:label></th>
					<td>
						<form:input path="truckno" cssClass="input-medium" id="jobno" maxlength="20" size="20" placeholder="ie. GJ-1-A-9999" tabindex="2"/>
						<form:errors cssClass="text-error" path="truckno" />
					</td>
				</tr>
				<tr>
					<th><form:label path="factoryinvoiceno"><s:message code="pkgCartingForm.factoryinvoiceno" /></form:label></th>
					<td >
						<form:input path="factoryinvoiceno" cssClass="input-medium" id="factoryinvoiceno" maxlength="20" size="20" placeholder="ie. VCL/UK/001-1314" tabindex="3" />
						<form:errors cssClass="text-error" path="factoryinvoiceno" /> 	
					</td>
				</tr>
				<tr>
					<th><form:label path="are1no"><s:message code="pkgCartingForm.are1no" /></form:label></th>
					<td>
						<form:input path="are1no" cssClass="input-medium" id="are1no" maxlength="20" size="20" placeholder="" tabindex="4"/>
						<form:errors cssClass="text-error" path="are1no" />
					</td>
				</tr>
				<tr>
				<th><form:label path="packagescarted"><s:message code="pkgCartingForm.packagescarted" /></form:label></th>
					<td>
						<form:input path="packagescarted" cssClass="input-mini" id="packagescarted" maxlength="20" size="20" tabindex="5"/>
						<form:errors cssClass="text-error" path="packagescarted" />
						&nbsp;
						<form:input path="cartingdate" cssClass="input-small" id="cartingdate" maxlength="10" size="20" placeholder="DD/MM/YYYY" tabindex="6"/>
						<form:errors cssClass="text-error" path="cartingdate" />
					</td>
				</tr>
				<tr>
					<th><form:label path="remarks"><s:message code="pkgCartingForm.remarks" /></form:label></th>
					<td>
					<form:input path="remarks" cssClass="input-large" id="remarks" maxlength="30" size="30" type="text" tabindex="6"/>
					<form:errors cssClass="text-error" path="remarks" />
					</td>
				</tr>
			</table>
		<br>
			<button class="btn btn-primary" type="submit" formaction="AddPkgCarting" formmethod="post" tabindex="7"><s:message code="app.add" /></button>
			<button class="btn" type="submit" formaction="AddFCLDatemanager" form="cancelForm" formmethod="get" tabindex="8"><s:message code="app.cancel" /></button>
		</form:form>
	</div>
</body>
</html>